<template>
  <div class="page-container">
    <div class="box-wrapper" v-if="ocrDetail.ocr !== ''">
      <div class="logo-title-wrapper">
        <span class="title">OCR识别服务</span>
        <span class="open" v-if="ocrDetail.ocr">已开通</span>
        <span class="close" v-else>暂未开通</span>
      </div>
      <div class="text">
        {{ ocrDetail.ocr ? '如需关闭OCR识别服务请联系启程的工作人员' : '如需开通OCR识别服务请联系启程的工作人员' }}
      </div>
      <div class="text-wrapper">
        <p class="desc"> 支持会员身份证、驾驶证、车辆行驶证、年检证识别 </p>
        <p class="price"> <span style="color: #1D2129">识别费用：</span>0.24元/次 </p>
      </div>
    </div>
  </div>
</template>

<script setup name="ocrIdentification">
  import { ref } from 'vue'
  import { epAddedServiceBrief } from '@/api/finance/reversePriceWriting'
  // 服务状态
  const ocrDetail = ref({})
  const getDetailApi = () => {
    epAddedServiceBrief().then(({ result }) => {
      ocrDetail.value = result
    })
  }

  getDetailApi()
</script>

<style lang="less" scoped>
  .page-container {
    .box-wrapper {
      display: flex;
      justify-content: flex-start;
      flex-direction: column;
      align-items: flex-start;
      width: 100%;
      height: 80vh;
      padding: 74px 0 0 57px;
      background-image: url('../../../assets/box-bg.png') !important;
      background-size: cover;

      .logo-title-wrapper {
        position: relative;
        .title {
          font-weight: 500;
          font-size: 32px;
          color: #1d2129;
          line-height: 40px;
        }
        .open,
        .close {
          vertical-align: top;
          padding: 0px 10px;
          font-weight: 600;
          font-size: 12px;
          color: #ffffff;
          background: linear-gradient(222deg, #ff7a66 0%, #ff5b60 100%);
          border-radius: 60px;
        }
        .close {
          color: #919aa5;
          background: linear-gradient(222deg, #f2f3f5 0%, #dbdbdb 100%);
        }
      }
      .text {
        font-weight: 400;
        font-size: 14px;
        margin: 12px 0 20px 0;
        color: #919aa5;
      }
      .text-wrapper{
        color: #1890FF;
        .desc{
          font-weight: 500;
          font-size: 16px;
          margin-bottom: 20px;
        }
        .price{
          font-weight: 400;
          font-size: 14px;
        }
      }
    }
  }
</style>
